package luj.game.robot.internal.concurrent.instance.prestart;

import luj.cluster.api.actor.Tellable;
import luj.game.robot.api.action.RobotCreateListener;
import luj.game.robot.internal.concurrent.parent.RobotBossDependency;
import luj.game.robot.internal.start.botinstance.RobotState;

final class CreateContextImpl implements RobotCreateListener.Context {

  @Override
  public RobotCreateListener.Worker robot() {
    var worker = new WorkerImpl();
    worker._robotState = _workerState;
    worker._internal = _workerInternal;

    return worker;
  }

  @Override
  public RobotCreateListener.Boss boss() {
    var boss = new BossImpl();
    boss._bossRef = _bossRef;
    boss._dependency = _bossDependency;

    return boss;
  }

  RobotState _workerState;
  RobotCreateListener.Internal _workerInternal;

  Tellable _bossRef;
  RobotBossDependency _bossDependency;
}
